import { reactive } from 'vue';

type Discount = {
	discount: number;
	money: number;
	sale: number;
};

export type State = {
	busId: number;
	discounts: Array<Discount>;
};

export const state = reactive({ busId: 0, discounts: [] } as State);

export const setBusId = (num: number) => {
	state.busId = num;
};

export const setDiscounts = (discounts: Array<Discount>) => {
	state.discounts = discounts;
};
